package com.sctvcloud.weiyuan.beans;

import android.support.annotation.NonNull;
import android.text.TextUtils;

import com.ruihang.generalibrary.utils.IDataDate;

import java.io.Serializable;
import java.sql.Date;

public class GalleryBean implements Serializable ,IDataDate {

    private int newsId;
    private String newsCover;


    private int newsCoverType;
    private String newsPicCount;

    private String newsTitle;
    private int newsType;
    private String newsUrl;

    private String pubTime;
    private String newsSource;
    private int skipType;

    protected Date pubTimeTemp;


    public int getNewsId() {
        return newsId;
    }

    public void setNewsId(int newsId) {
        this.newsId = newsId;
    }

    public String getNewsCover() {
        return newsCover;
    }

    public void setNewsCover(String newsCover) {
        this.newsCover = newsCover;
    }

    public int getNewsCoverType() {
        return newsCoverType;
    }

    public void setNewsCoverType(int newsCoverType) {
        this.newsCoverType = newsCoverType;
    }

    public String getNewsPicCount() {
        return newsPicCount;
    }

    public void setNewsPicCount(String newsPicCount) {
        this.newsPicCount = newsPicCount;
    }

    public String getNewsTitle() {
        return newsTitle;
    }

    public void setNewsTitle(String newsTitle) {
        this.newsTitle = newsTitle;
    }

    public int getNewsType() {
        return newsType;
    }

    public void setNewsType(int newsType) {
        this.newsType = newsType;
    }

    public String getNewsUrl() {
        return newsUrl;
    }

    public void setNewsUrl(String newsUrl) {
        this.newsUrl = newsUrl;
    }

    public String getPubTime() {
        return pubTime;
    }

    public void setPubTime(String pubTime) {
        if (!TextUtils.equals(pubTime, this.pubTime)) {
            pubTimeTemp = null;
        }
        this.pubTime = pubTime;
    }

    public String getNewsSource() {
        return newsSource;
    }

    public void setNewsSource(String newsSource) {
        this.newsSource = newsSource;
    }

    public int getSkipType() {
        return skipType;
    }

    public void setSkipType(int skipType) {
        this.skipType = skipType;
    }

    @Override
    public Date getDataDate() {
        return pubTimeTemp;
    }

    @Override
    public void setDataDate(Date date) {
        this.pubTimeTemp = date;
    }

    @NonNull
    @Override
    public String getDatePattern() {
        return "yyyy-MM-dd HH:mm:ss";
    }

    @Override
    public String getDateString() {
        return pubTime;
    }
}
